home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / daten / astrolog / src / charts0.c < prev    next >
C/C++ Source or Header  |  1995-08-11  |  45KB  |  1,259 lines

  1. /*                                                               -*- C -*-
  2. ** Astrolog (Version 4.40) File: charts0.c
  3. **
  4. ** IMPORTANT NOTICE: The graphics database and chart display routines
  5. ** used in this program are Copyright (C) 1991-1995 by Walter D. Pullen
  6. ** (astara@u.washington.edu). Permission is granted to freely use and
  7. ** distribute these routines provided one doesn't sell, restrict, or
  8. ** profit from them in any way. Modification is allowed provided these
  9. ** notices remain with any altered or edited versions of the program.
  10. **
  11. ** The main planetary calculation routines used in this program have
  12. ** been Copyrighted and the core of this program is basically a
  13. ** conversion to C of the routines created by James Neely as listed in
  14. ** Michael Erlewine's 'Manual of Computer Programming for Astrologers',
  15. ** available from Matrix Software. The copyright gives us permission to
  16. ** use the routines for personal use but not to sell them or profit from
  17. ** them in any way.
  18. **
  19. ** The PostScript code within the core graphics routines are programmed
  20. ** and Copyright (C) 1992-1993 by Brian D. Willoughby
  21. ** (brianw@sounds.wa.com). Conditions are identical to those above.
  22. **
  23. ** The extended accurate ephemeris databases and formulas are from the
  24. ** calculation routines in the program "Placalc" and are programmed and
  25. ** Copyright (C) 1989,1991,1993 by Astrodienst AG and Alois Treindl
  26. ** (alois@azur.ch). The use of that source code is subject to
  27. ** regulations made by Astrodienst Zurich, and the code is not in the
  28. ** public domain. This copyright notice must not be changed or removed
  29. ** by any user of this program.
  30. **
  31. ** Initial programming 8/28,30, 9/10,13,16,20,23, 10/3,6,7, 11/7,10,21/1991.
  32. ** X Window graphics initially programmed 10/23-29/1991.
  33. ** PostScript graphics initially programmed 11/29-30/1992.
  34. ** Last code change made 1/29/1995.
  35. */
  36.  
  37. /* $VER: $Id: charts0.c,v 1.2 1995/07/02 22:20:30 tf Exp $ */
  38.  
  39. #include "astrolog.h"
  40.  
  41.  
  42. /*
  43. ******************************************************************************
  44. ** Table Display Routines.
  45. ******************************************************************************
  46. */
  47.  
  48. /* A subprocedure of the credit displayed below, this prints out one line */
  49. /* of credit information on the screen. Given a string, it's displayed    */
  50. /* centered with left and right borders around it, in the given color.    */
  51.  
  52. void PrintW(sz, col)
  53. char *sz;
  54. int col;
  55. {
  56.   int i;
  57.  
  58.   if (!sz) 
  59.   {
  60.     /* Null string means print the top, bottom, or a separator row. */
  61.  
  62.     if (col < 0)
  63.       AnsiColor(kRed);
  64.  
  65.     PrintCh((char)(col ? (col > 0 ? chSW : chNW) : chJE));
  66.     PrintTab(chH, CREDITWIDTH);
  67.     PrintCh((char)(col ? (col > 0 ? chSE : chNE) : chJW));
  68.   }
  69.  
  70.   else
  71.   {
  72.     i = CchSz(sz);
  73.     PrintCh(chV);
  74.     PrintTab(' ', (CREDITWIDTH-i)/2 + (i&1));
  75.     AnsiColor(col);
  76.     PrintSz(sz);
  77.     PrintTab(' ', (CREDITWIDTH-i)/2);
  78.     AnsiColor(kRed);
  79.     PrintCh(chV);
  80.   }
  81.   PrintL();
  82. }
  83.  
  84.  
  85. /* Display a list of credits showing those who helped create the various  */
  86. /* parts of Astrolog, as well as important copyright and version info, as */
  87. /* displayed with the -Hc switch.                                         */
  88.  
  89. void DisplayCredits()
  90. {
  91.   char sz[cchSzDef];
  92.  
  93.   PrintW(NULL, -1);
  94.   sprintf(sz, "** %s version %s **", szAppName, szVersionCore);
  95.  
  96.   PrintW(sz, kWhite);
  97.   sprintf(sz, "As of %s", szDateCore); PrintW(sz, kLtGray);
  98.   sprintf(sz, "By Walter D. Pullen (%s)", szAddressCore); PrintW(sz, kCyan);
  99.  
  100.   PrintW(NULL, 0);
  101.   PrintW("Main planetary calculation formulas were converted from", kGreen);
  102.   PrintW("routines by James Neely, as listed in 'Manual of Computer Programming", kGreen);
  103.   PrintW("for Astrologers' by Michael Erlewine, available from Matrix Software.", kGreen);
  104.   PrintW("PostScript graphics routines by Brian D. Willoughby.", kYellow);
  105.   PrintW("Extended ephemeris calculation and formulas are by Alois Treindl,", kMagenta);
  106.   PrintW("as in the package 'Placalc', available from Astrodienst AG.", kMagenta);
  107.   PrintW("IMPORTANT: Astrolog is 'freeware', but is copyrighted and not in public", kLtGray);
  108.   PrintW("domain. Permission is granted to freely use and distribute these", kLtGray);
  109.   PrintW("routines provided one does not sell, restrict, or profit from the", kLtGray);
  110.   PrintW("program or its output in any way. Modification is allowed provided", kLtGray);
  111.   PrintW("these exact notices remain with any altered or edited versions of the", kLtGray);
  112.   PrintW("program. These conditions are true of both the program in whole and of", kLtGray);
  113.   PrintW("all parts by any individual author. Violators are subject to copyright", kLtGray);
  114.   PrintW("law penalties, and negative karmic debts to aforementioned contributors.", kLtGray);
  115.  
  116.   PrintW(NULL, 0);
  117.   PrintW("Special thanks to all those unmentioned, seen and unseen, who have", kBlue);
  118.   PrintW("pointed out problems, suggested features, & sent many positive vibes! :)", kBlue);
  119.  
  120.   PrintW(NULL, 1);
  121.   AnsiColor(kDefault);
  122. }
  123.  
  124.  
  125. /* Print out a command switch or keypress info line to the screen, as done  */
  126. /* with the -H switch or 'H' key in a graphic window. This is just printing */
  127. /* out the string, except in Ansi mode we set the proper colors: Red for    */
  128. /* header lines, Green for individual switches or keys, and White for the   */
  129. /* rest of the line telling what it does. We also prefix each switch with   */
  130. /* either Unix's '-' or PC's '/', whichever is appropriate for the system.  */
  131.  
  132.  
  133. #ifdef AMIGA /* GRAPH */
  134.  
  135. /*
  136.  *  This (static) procedure handles the special case where the PrintS output can
  137.  *  go to the graphic screen.  Actually this function is only called via PrintS()
  138.  *  if AMIGA is defined at compile time.
  139.  */
  140.  
  141. static void PrintSX(char *sz) /* written by tf */
  142. {
  143.   char buf[1024];
  144.   int n,c,dash= (int)sz[1];
  145.  
  146.   if(*sz != ' ')       DrawColor(kRed);
  147.   else if(dash != ' ') DrawColor(dash == 'P' || sz[3] == ' ' || sz[3] == ':' ? kGreen : kDkGreen);
  148.   else                 DrawColor(kDefault);
  149.  
  150.   n=0;
  151.  
  152.   while((c = *sz) && c != ':' && (dash != 'P' || (c != ' ' || *(sz+1) != 't')))
  153.   {
  154.     if (c != '_')   buf[n++]= c;
  155.     else            buf[n++]= chSwitch;
  156.     sz++;
  157.   }
  158.  
  159.   if (*sz) buf[n++]= *sz++;
  160.   buf[n]= '\0'; xPutString(buf);
  161.  
  162.   DrawColor(kDefault);
  163.  
  164.   if(*sz)
  165.   {
  166.     buf[n=0]= '\0';
  167.  
  168.     while( (c = *sz) )
  169.     {
  170.       if (c != '_')   buf[n++]= c;
  171.       else            buf[n++]= chSwitch;
  172.       sz++;
  173.     }
  174.  
  175.     buf[n]= '\0';
  176.     xPutString(buf);
  177.   }
  178.  
  179.   xPutString("\n");
  180. }
  181. #endif /* AMIGA */
  182.  
  183. void PrintS(sz)
  184. char *sz;
  185. {
  186.   int dash;
  187.   char c;
  188.  
  189. #ifdef AMIGA
  190.   if(gi.win) { PrintSX(sz); return; }
  191. #endif /* AMIGA */
  192.  
  193.   dash = sz[1];
  194.  
  195.   if (*sz != ' ')        AnsiColor(kRed);
  196.   else if (dash != ' ')  AnsiColor(dash == 'P' || sz[3] == ' ' || sz[3] == ':' ? kGreen : kDkGreen);
  197.   else                   AnsiColor(kDefault);
  198.  
  199.   while ((c = *sz) && c != ':' && (dash != 'P' || (c != ' ' || *(sz+1) != 't')))
  200.   {
  201.     if (c != '_')   PrintCh(c);
  202.     else            PrintCh(chSwitch);
  203.  
  204.     sz++;
  205.   }
  206.  
  207.   if (*sz) PrintCh(*sz++);
  208.   AnsiColor(kDefault);
  209.  
  210.   while( (c = *sz) )
  211.   {
  212.     if (c != '_')   PrintCh(c);
  213.     else            PrintCh(chSwitch);
  214.  
  215.     sz++;
  216.   }
  217.   PrintL();
  218. }
  219.  
  220. /* Print a list of every command switch that can be passed to the program, */
  221. /* and a description of what it does. This is what the -H switch prints.   */
  222.  
  223. void DisplaySwitches()
  224. {
  225.   char sz[cchSzDef];
  226.  
  227.   sprintf(sz, "%s (version %s) command switches:", szAppName, szVersionCore);
  228.   PrintS(sz);
  229.   PrintS(" _H: Display this help list.");
  230.   PrintS(" _Hc: Display program credits and copyrights.");
  231.   PrintS(" _HC: Display names of zodiac signs and houses.");
  232.   PrintS(" _HO: Display available planets and other celestial objects.");
  233.   PrintS(" _HA: Display available aspects, their angles, and present orbs.");
  234. #ifdef CONSTEL
  235.   PrintS(" _HF: Display names of astronomical constellations.");
  236. #endif
  237.   PrintS(" _HS: Display information about planets in the solar system.");
  238. #ifdef INTERPRET
  239.   PrintS(" _HI: Display meanings of signs, houses, planets, and aspects.");
  240. #endif
  241.   sprintf(sz," _He: Display all info tables together (_Hc_H_Y_HX_HC_HO_HA%s_HS%s).",
  242. #ifdef CONSTEL
  243.   "_HF",
  244. #else
  245.   "",
  246. #endif
  247. #ifdef INTERPRET
  248.   "_HI");
  249. #else
  250.   "");
  251. #endif
  252.   PrintS(sz);
  253.   PrintS(" _Q: Prompt for more command switches after display finished.");
  254. #ifdef SWITCHES
  255.   PrintS(" _Q0: Like _Q but prompt for additional switches on startup.");
  256. #endif
  257.   PrintS(" _M <1-48>: Run the specified command switch macro.");
  258.   PrintS(" _M0 <1-48> <string>: Define the specified command switch macro.");
  259.   PrintS(" _Y: Display help list of less commonly used command switches.");
  260.   PrintS("\nSwitches which determine the type of chart to display:");
  261.   PrintS(" _v: Display list of object positions (chosen by default).");
  262.   PrintS(" _v0: Like _v but express velocities relative to average speed.");
  263.   PrintS(" _w [<rows>]: Display chart in a graphic house wheel format.");
  264.   PrintS(" _w0 [..]: Like _w but reverse order of objects in houses 4..9.");
  265.   PrintS(" _g: Display aspect and midpoint grid among planets.");
  266.   PrintS(" _g0: Like _g but flag aspect configurations (e.g. Yod's) too.");
  267.   PrintS(" _g0: For comparison charts, show midpoints instead of aspects.");
  268.   PrintS(" _ga: Like _g but indicate applying instead of difference orbs.");
  269.   PrintS(" _gp: Like _g but generate parallel and contraparallel aspects.");
  270.   PrintS(" _a: Display list of all aspects ordered by influence.");
  271.   PrintS(" _a0: Like _a but display aspect summary too.");
  272.   PrintS(" _a[0]a: Like _a but indicate applying and separating orbs.");
  273.   PrintS(" _a[0]p: Like _a but do parallel and contraparallel aspects.");
  274.   PrintS(" _m: Display all object midpoints in sorted zodiac order.");
  275.   PrintS(" _m0: Like _m but display midpoint summary too.");
  276.   PrintS(" _Z: Display planet locations with respect to the local horizon.");
  277. #ifdef GRAPH
  278.   PrintS(" _Z0: Like _Z but express coordinates relative to polar center.");
  279. #endif
  280.   PrintS(" _Zd: Search day for object local rising and setting times.");
  281.   PrintS(" _S: Display x,y,z coordinate positions of planets in space.");
  282.   PrintS(" _j: Display astrological influences of each object in chart.");
  283.   PrintS(" _j0: Like _j but include influences of each zodiac sign as well.");
  284.   PrintS(" _L [<step>]: Display astro-graph locations of planetary angles.");
  285.   PrintS(" _L0 [..]: Like _L but display list of latitude crossings too.");
  286.   PrintS(" _K: Display a calendar for given month.");
  287.   PrintS(" _Ky: Like _K but display a calendar for the entire year.");
  288.   PrintS(" _d [<step>]: Print all aspects and changes occurring in a day.");
  289.   PrintS(" _dm: Like _d but print all aspects for the entire month.");
  290.   PrintS(" _dy: Like _d but print all aspects for the entire year.");
  291.   PrintS(" _dY <years>: Like _d but search within a number of years.");
  292.   PrintS(" _dp <month> <year>: Print aspects within progressed chart.");
  293.   PrintS(" _dpy <year>: Like _dp but search for aspects within entire year.");
  294.   PrintS(" _dpY <year> <years>: Like _dp but search within number of years.");
  295.   PrintS(" _dp[y]n: Search for progressed aspects in current month/year.");
  296.   PrintS(" _D: Like _d but display aspects by influence instead of time.");
  297.   PrintS(" _E: Display planetary ephemeris for given month.");
  298.   PrintS(" _Ey: Display planetary ephemeris for the entire year.");
  299.   PrintS(" _EY <years>: Display planetary ephemeris for a number of years.");
  300.   PrintS(" _e: Print all charts together (i.e. _v_w_g0_a_m_Z_S_j0_L0_K_d_D_E).");
  301.   PrintS(" _t <month> <year>: Compute all transits to natal planets in month.");
  302.   PrintS(" _tp <month> <year>: Compute progressions in month for chart.");
  303.   PrintS(" _t[p]y: <year>: Compute transits/progressions for entire year.");
  304.   PrintS(" _t[p]Y: <year> <years>: Compute transits for a number of years.");
  305. #ifdef TIME
  306.   PrintS(" _t[py]n: Compute transits to natal planets for current time now.");
  307. #endif
  308.   PrintS(" _T <month> <day> <year>: Display transits ordered by influence.");
  309.   PrintS(" _Tp <month> <day> <year>: Print progressions instead of transits.");
  310. #ifdef TIME
  311.   PrintS(" _T[p]n: Display transits ordered by influence for current date.");
  312. #endif
  313. #ifdef ARABIC
  314.   PrintS(" _P [<parts>]: Display list of Arabic parts and their positions.");
  315.   PrintS(" _P0 [<parts>]: Like _P but display formulas with terms reversed.");
  316.   PrintS(" _P[z,n,f]: Order parts by position, name, or formula.");
  317. #endif
  318. #ifdef INTERPRET
  319.   PrintS(" _I [<columns>]: Print interpretation of selected charts.");
  320. #endif
  321.   PrintS("\nSwitches which affect how the chart parameters are obtained:");
  322. #ifdef TIME
  323.   PrintS(" _n: Compute chart for this exact moment using current time.");
  324.   PrintS(" _n[d,m,y]: Compute chart for start of current day, month, year.");
  325. #endif
  326.   PrintS(" _z [<zone>]: Change the default time zone (for _d_E_t_q options).");
  327.   PrintS(" _z0 [<offset>]: Change the default daylight time setting.");
  328.   PrintS(" _zl <long> <lat>: Change the default longitude & latitude.");
  329.   PrintS(" _zt <time>: Set only the time of current chart.");
  330.   PrintS(" _zd <date>: Set only the day of current chart.");
  331.   PrintS(" _zi <name> <place>: Set name and place strings of current chart.");
  332.   PrintS(" _q <month> <date> <year> <time>: Compute chart with defaults.");
  333.   PrintS(" _qd <month> <date> <year>: Compute chart for noon on date.");
  334.   PrintS(" _qm <month> <year>: Compute chart for first of month.");
  335.   PrintS(" _qy <year>: Compute chart for first day of year.");
  336.   PrintS(" _qa <month> <date> <year> <time> <zone> <long> <lat>:");
  337.   PrintS("     Compute chart automatically given specified data.");
  338.   PrintS(" _qb <month> <date> <year> <time> <daylight> <zone> <long> <lat>:");
  339.   PrintS("     Like _qa but takes additional parameter for daylight offset.");
  340.   PrintS(" _qj <day>: Compute chart for time of specified Julian day.");
  341.   PrintS(" _i <file>: Compute chart based on info in file.");
  342.   PrintS(" _o <file> [..]: Write parameters of current chart to file.");
  343.   PrintS(" _o0 <file> [..]: Like _o but output planet/house positions.");
  344.   PrintS(" _os <file>, > <file>: Redirect output of text charts to file.");
  345.   PrintS("\nSwitches which affect what information is used in a chart:");
  346.   PrintS(" _R [<obj1> [<obj2> ..]]: Restrict specific bodies from displays.");
  347.   PrintS(" _R0 [<obj1> ..]: Like _R but restrict everything first.");
  348.   PrintS(" _R1 [<obj1> ..]: Like _R0 but unrestrict and show all objects.");
  349.   PrintS(" _R[C,u,U]: Restrict all minor cusps, all uranians, or stars.");
  350.   PrintS(" _RT[0,1,C,u,U] [..]: Restrict transiting planets in _t lists.");
  351.   PrintS(" _RA [<asp1> ..]: Restrict aspects by giving them negative orbs.");
  352.   PrintS(" _C: Include angular and non-angular house cusps in charts.");
  353.   PrintS(" _u: Include transneptunian/uranian bodies in charts.");
  354.   PrintS(" _U: Include locations of fixed background stars in charts.");
  355.   PrintS(" _U[z,l,n,b]: Order by azimuth, altitude, name, or brightness.");
  356.   PrintS(" _A <0-18>: Specify the number of aspects to use in charts.");
  357.   PrintS(" _Ao <aspect> <orb>: Specify maximum orb for an aspect.");
  358.   PrintS(" _Am <planet> <orb>: Specify maximum orb allowed to a planet.");
  359.   PrintS(" _Ad <planet> <orb>: Specify orb addition given to a planet.");
  360.   PrintS(" _Aa <aspect> <angle>: Change the actual angle of an aspect.");
  361.   PrintS("\nSwitches which affect how a chart is computed:");
  362. #ifdef PLACALC
  363.   PrintS(" _b: Use ephemeris files for more accurate location computations.");
  364.   PrintS(" _b0: Like _b but display locations to the nearest second too.");
  365. #endif
  366.   PrintS(" _c <value>: Select a different default system of houses.");
  367.   PrintS("     (0 = Placidus, 1 = Koch, 2 = Equal, 3 = Campanus, 4 = Meridian,");
  368.   PrintS("     5 = Regiomontanus, 6 = Porphyry, 7 = Morinus, 8 = Topocentric,");
  369.   PrintS("     9 = Equal (MC), 10 = Neo-Porphyry, 11 = Whole, 12 = None.)");
  370.   PrintS(" _s [..]: Compute a sidereal instead of the normal tropical chart.");
  371.   PrintS(" _sr: Compute right ascension locations relative to equator.");
  372.   PrintS(" _s[z,h,d]: Display locations as in zodiac, hours/minutes, or degrees.");
  373.   PrintS(" _h [<objnum>]: Compute positions centered on specified object.");
  374.   PrintS(" _p <month> <day> <year>: Cast 2ndary progressed chart for date.");
  375.   PrintS(" _p0 <month> <day> <year>: Cast solar arc chart for date.");
  376. #ifdef TIME
  377.   PrintS(" _p[0]n: Cast progressed chart based on current date now.");
  378. #endif
  379.   PrintS(" _pd <days>: Set no. of days to progress / day (default 365.25).");
  380.   PrintS(" _x <value>: Cast harmonic chart based on specified factor.");
  381.   PrintS(" _1 [<objnum>]: Cast chart with specified object on Ascendant.");
  382.   PrintS(" _2 [<objnum>]: Cast chart with specified object on Midheaven.");
  383.   PrintS(" _3: Display objects in their zodiac decan positions.");
  384.   PrintS(" _f: Display houses as sign positions (flip them).");
  385.   PrintS(" _G: Compute houses based on geographic location only.");
  386.   PrintS(" _F <objnum> <sign> <deg>: Force object's position to be value.");
  387.   PrintS(" _+ [<days>]: Cast chart for specified no. of days in the future.");
  388.   PrintS(" _- [<days>]: Cast chart for specified no. of days in the past.");
  389.   PrintS(" _+[m,y] [<value>]: Cast chart for no. of months/years in future.");
  390.   PrintS("\nSwitches for relationship and comparison charts:");
  391.   PrintS(" _r <file1> <file2>: Compute a relationship synastry chart.");
  392.   PrintS(" _rc <file1> <file2>: Compute a composite chart.");
  393.   PrintS(" _rm <file1> <file2>: Compute a time space midpoint chart.");
  394.   PrintS(" _r[c,m]0 <file1> <file2> <ratio1> <ratio2>: Weighted chart.");
  395.   PrintS(" _rd <file1> <file2>: Print time span between files' dates.");
  396. #ifdef BIORHYTHM
  397.   PrintS(" _rb <file1> <file2>: Display biorhythm for file1 at time file2.");
  398. #endif
  399.   PrintS(" _r0 <file1> <file2>: Keep the charts separate in comparison.");
  400.   PrintS(" _rp[0] <file1> <file2>: Like _r0 but do file1 progr. to file2.");
  401.   PrintS(" _rt <file1> <file2>: Like _r0 but treat file2 as transiting.");
  402. #ifdef TIME
  403.   PrintS(" _y <file>: Display current house transits for particular chart.");
  404. #ifdef BIORHYTHM
  405.   PrintS(" _y[b,d,p,t] <file>: Like _r0 but compare to current time now.");
  406. #endif
  407. #endif /* TIME */
  408.   PrintS("\nSwitches to access graphics options:");
  409.   PrintS(" _k: Display text charts using Ansi characters and color.");
  410. #ifdef MSG
  411.   PrintS(" _V: <25,43,50>: Start up with text mode set to number of rows.");
  412. #endif
  413.  
  414.   /* If graphics features are compiled in, call an additional procedure to */
  415.   /* display the command switches offered dealing with the graphics stuff. */
  416.  
  417. #ifdef GRAPH
  418.   DisplaySwitchesX();
  419. #endif
  420. }
  421.  
  422.  
  423. /* Print a list of the obscure command switches that can be passed to the */
  424. /* program and a description of them. This is what the -Y switch prints.  */
  425.  
  426. void DisplaySwitchesRare()
  427. {
  428.   char sz[cchSzDef];
  429.  
  430.   sprintf(sz, "%s (version %s) obscure command switches:",
  431.     szAppName, szVersionCore);
  432.   PrintS(sz);
  433.   PrintS(" _Y: Display this help list.");
  434.   PrintS(" _Yn: Compute location of true instead of mean node.");
  435.   PrintS(" _Yd: Display dates in D/M/Y instead of M/D/Y format.");
  436.   PrintS(" _Yt: Display times in 24 hour instead of am/pm format.");
  437.   PrintS(" _YC: Automatically ignore insignificant house cusp aspects.");
  438.   PrintS(" _Y8: Clip text charts at the 80th column.");
  439.   PrintS(" _YQ <rows>: Pause text scrolling after a page full has printed.");
  440.   PrintS(" _Yo: Output chart info and position files in old style format.");
  441. #ifdef ARABIC
  442.   PrintS(" _YP <-1,0,1>: Set how Arabic parts are computed for night charts.");
  443. #endif
  444.   PrintS(" _YE <obj> <semi-major axis> <eccentricity (3)> <inclination (3)>");
  445.   PrintS("     <perihelion (3)> <ascending node (3)> <time offset (3)>");
  446.   PrintS("     Change orbit of object to be the given elements.");
  447.   PrintS(" _YR <obj1> <obj2> <flag1>..<flag2>: Set restrictions for object range.");
  448.   PrintS(" _YRT <obj1> <obj2> <flag1>..<flag2>: Transit restrictions for range.");
  449.   PrintS(" _YR0 <flag1> <flag2>: Set restrictions for sign, direction changes.");
  450.   PrintS(" _YAo <asp1> <asp2> <orb1>..<orb2>: Set aspect orbs for range.");
  451.   PrintS(" _YAm <obj1> <obj2> <orb1>..<orb2>: Set max planet orbs for range.");
  452.   PrintS(" _YAd <obj1> <obj2> <orb1>..<orb2>: Set planet orb additions for range.");
  453.   PrintS(" _Yj <obj1> <obj2> <inf1>..<inf2>: Set influences for object range.");
  454.   PrintS(" _YjC <cusp1> <cusp2> <inf1>..<inf2>: Set influences for house cusps.");
  455.   PrintS(" _YjA <asp1> <asp2> <inf1>..<inf2>: Set influences for aspect range.");
  456.   PrintS(" _YjT <obj1> <obj2> <inf1>..<inf2>: Set transit influences for range.");
  457.   PrintS(" _Yj0 <inf1> <inf2> <inf3> <inf4>: Set influences given to planets");
  458.   PrintS("     in ruling sign, exalted sign, ruling house, exalted house.");
  459.   PrintS(" _YI <obj> <string>: Customize interpretation for object.");
  460.   PrintS(" _YIa <sign> <string>: Customize interpretation adjective for sign.");
  461.   PrintS(" _YIv <sign> <string>: Customize interpretation verb for sign.");
  462.   PrintS(" _YIC <house> <string>: Customize interpretation for house.");
  463.   PrintS(" _YIA <asp> <string>: Customize interpretation for aspect.");
  464.   PrintS(" _YIA0 <asp> <string>: Customize aspect interpretation statement.");
  465.   PrintS(" _YkC <fir> <ear> <air> <wat>: Customize element colors.");
  466.   PrintS(" _YkA <asp1> <asp2> <col1>..<col2>: Customize aspect colors.");
  467.   PrintS(" _Yk0 <1..7> <1..7> <col1>..<col2>: Customize 'rainbow' colors.");
  468.   PrintS(" _Yk <0..8> <0..8> <col1>..<col2>: Customize 'general' colors.");
  469.   PrintS(" _YXG <0-2><0-2><0-2><0-3>: Select among different graphic glyphs");
  470.   PrintS("     for Capricorn, Uranus, Pluto, and Lilith.");
  471.   PrintS(" _YXg <cells>: Set number of cells for graphic aspect grid.");
  472.   PrintS(" _YXf <val>: Set usage of actual system fonts in graphic file.");
  473.   PrintS(" _YXp <-1,0,1>: Set paper orientation for PostScript files.");
  474.   PrintS(" _YXp0 <hor> <ver>: Set paper size for PostScript files.");
  475. #ifdef PCG
  476.   PrintS(" _YX <hi-res> <lo-res>: Set modes to use for PC screen graphics.");
  477. #endif
  478.   PrintS(" _;: Ignore rest of command line and treat it as a comment.");
  479. }
  480.  
  481.  
  482. /* Print out a list of the various objects - planets, asteroids, house     */
  483. /* cusps, stars - recognized by the program, and their index values. This  */
  484. /* is displayed when the -O switch is invoked. For some objects, display   */
  485. /* additional information, e.g. ruling signs for planets, brightnesses and */
  486. /* positions in the sky for fixed stars, etc.                              */
  487.  
  488. void PrintObjects()
  489. {
  490.   char sz[cchSzDef];
  491.   CI ci;
  492.   int i, j;
  493.   real Off;
  494.  
  495.   if (!us.fCusp)
  496.   {
  497.     for (i = cuspLo; i <= cuspHi; i++)    /* Set up restrictions properly: */
  498.       ignore[i] = fTrue;                  /* Minor cusps and uranians      */
  499.   }                                       /* included only if -C and -u    */
  500.                                           /* switches are in effect.       */
  501.   if (!us.fUranian)
  502.   {
  503.     for (i = uranLo; i <= uranHi; i++)
  504.       ignore[i] = fTrue;
  505.   }
  506.  
  507.   sprintf(sz, "%s planets and objects:\n", szAppName);
  508.   PrintSz(sz);
  509.   PrintSz("No. Name       Rule Co-Rule Fall Co-Fall Exalt Debilitate\n\n");
  510.  
  511.   for (i = 1; i <= oNorm; i++) if (!ignore[i]) 
  512.   {
  513.     AnsiColor(kObjA[i]);
  514.     sprintf(sz, "%2d %-12s", i, szObjName[i]); PrintSz(sz);
  515.  
  516.     if (i <= oCore)                                /* Print rulerships, etc */
  517.     {                                              /* for the planets.      */
  518.       if (ruler1[i])
  519.       {
  520.         j = ruler2[i];
  521.  
  522.         sprintf(sz, "%c%c%c  %c%c%c     ", chSig3(ruler1[i]),
  523.           j ? szSignName[j][0] : ' ',
  524.           j ? szSignName[j][1] : ' ',
  525.           j ? szSignName[j][2] : ' '); PrintSz(sz);
  526.  
  527.         sprintf(sz, "%c%c%c  %c%c%c     ", chSig3(Mod12(ruler1[i]+6)),
  528.           j ? szSignName[Mod12(j+6)][0] : ' ',
  529.           j ? szSignName[Mod12(j+6)][1] : ' ',
  530.           j ? szSignName[Mod12(j+6)][2] : ' '); PrintSz(sz);
  531.  
  532.         sprintf(sz, "%c%c%c   %c%c%c", chSig3(exalt[i]),
  533.           chSig3(Mod12(exalt[i]+6))); PrintSz(sz);
  534.       }
  535.     }
  536.  
  537.     else /* i > oCore */
  538.     {
  539.       if (ruler1[i]) 
  540.       {
  541.         sprintf(sz, "%c%c%c          %c%c%c", chSig3(ruler1[i]),
  542.                                               chSig3(Mod12(ruler1[i]+6))); PrintSz(sz);
  543.  
  544.         sprintf(sz, "          %c%c%c   %c%c%c", chSig3(exalt[i]),
  545.                                                  chSig3(Mod12(exalt[i]+6))); PrintSz(sz);
  546.       }
  547.  
  548.       if(i <= cuspHi)  sprintf(sz, "  House Cusp #%d", i-cuspLo+1);
  549.       else             sprintf(sz, "  Uranian #%d",    i-uranLo+1);
  550.  
  551.       PrintSz(sz);
  552.     }
  553.     PrintL();
  554.   }
  555.  
  556.   /* Now, if -U in effect, read in and display stars in specified order. */
  557.  
  558.   if (us.nStar)
  559.   {
  560.     ci = ciCore;
  561.     Off = ProcessInput(fTrue);
  562.     ciCore = ci;
  563.     ComputeStars(us.fSiderial ? 0.0 : -Off);
  564.  
  565.     for (i = starLo; i <= starHi; i++) if (!ignore[i])
  566.     {
  567.       j = oNorm+starname[i-oNorm];
  568.       AnsiColor(kObjA[j]);
  569.       sprintf(sz, "%2d %-12s", i, szObjName[j]); PrintSz(sz);
  570.       sprintf(sz, "Star #%2d   ", i-oNorm); PrintSz(sz);
  571.       PrintZodiac(planet[j]);
  572.       PrintTab(' ', 4);
  573.       PrintAltitude(planetalt[j]);
  574.       sprintf(sz, " %5.2f\n", starbright[j-oNorm]); PrintSz(sz);
  575.     }
  576.   }
  577.   AnsiColor(kDefault);
  578. }
  579.  
  580.  
  581. /* Print out a list of all the aspects recognized by the program, and info  */
  582. /* about them: their names, index numbers, degree angles, present orbs, and */
  583. /* the description of their glyph. This gets displayed when the -A switch   */
  584. /* is invoked (without any argument).                                       */
  585.  
  586. void PrintAspects()
  587. {
  588.   char sz[cchSzDef];
  589.   int i;
  590.  
  591.   sprintf(sz,
  592.     "%s aspects:\nNo. Name         Abbrev. ", szAppName); PrintSz(sz);
  593.   PrintSz("Angle    Orb          Description of glyph\n\n");
  594.  
  595.   for (i = 1; i <= cAspect; i++)
  596.   {
  597.     AnsiColor(kAspA[i]);
  598.     sprintf(sz, "%2d %-15s(%s) %6.2f +/- %1.0f degrees - %s\n",
  599.       i, szAspectName[i], szAspectAbbrev[i],
  600.       aspectangle[i], aspectorb[i], szAspectGlyph[i]); PrintSz(sz);
  601.   }
  602.   AnsiColor(kDefault);
  603. }
  604.  
  605.  
  606. /* Print out a list of the 12 signs and houses of the zodiac, and their    */
  607. /* standard and traditional names, as done when the -H0 switch is invoked. */
  608.  
  609. void PrintSigns()
  610. {
  611.   char sz[cchSzDef];
  612.   int i;
  613.  
  614.   sprintf(sz, "%s signs and houses:\n", szAppName); PrintSz(sz);
  615.   PrintSz("Sign        English name      House Traditional name\n\n");
  616.  
  617.   for (i = 1; i <= cSign; i++) 
  618.   {
  619.     AnsiColor(kSignA(i));
  620.     sprintf(sz, "%-12sthe %-14s%2d%s  House of %s\n",
  621.       szSignName[i], szSignEnglish[i], i, szSuffix[i], szHouseTradition[i]);
  622.     PrintSz(sz);
  623.   }
  624.   AnsiColor(kDefault);
  625. }
  626.  
  627.  
  628. #ifdef CONSTEL
  629. /* Given the standard 'noun' form of a constellation string, convert it  */
  630. /* to its genitive or posessive form. Some standard rules are used but a */
  631. /* special instructions string is passed for special cases.              */
  632.  
  633. char *GetSzGenitive(szGen, szInst)
  634. char *szGen, *szInst;
  635. {
  636.   char *pch, ch1, ch2;
  637.   int cch;
  638.  
  639.   pch = szGen + CchSz(szGen);
  640.  
  641.   if (*szInst == ' ')            /* Instructions starting with a space or */
  642.     szInst++;                    /* that are empty means no special case. */
  643.  
  644.   else if (*szInst)
  645.   {
  646.     cch = *szInst - '0';
  647.     if (cch < 10)            /* Instructions starting with a number means */
  648.     {
  649.       szInst++;              /* hack off that many characters of string.  */
  650.       pch -= cch;
  651.     }
  652.     while (*szInst > '9')  /* Instructions end with characters to append. */
  653.       *pch++ = *szInst++;
  654.  
  655.     *pch = chNull;
  656.     return szInst;
  657.   }
  658.   ch1 = *(pch-1);
  659.   ch2 = *(pch-2);
  660.  
  661.   if (ch1 == 'a')             /* Standard rule: 'a' ending -> 'ae'. */
  662.   {
  663.     *pch++ = 'e';
  664.     *pch = chNull;
  665.   }
  666.  
  667.   else if (ch1 == 's' && ch2 == 'u')      /* 'us' ending -> 'i'. */
  668.   {
  669.     *(pch-2) = 'i';
  670.     *(pch-1) = chNull;
  671.   } 
  672.  
  673.   else if (ch1 == 'm' && ch2 == 'u')      /* 'um' ending -> 'i'. */
  674.   {
  675.     *(pch-2) = 'i';
  676.     *(pch-1) = chNull;
  677.   }
  678.  
  679.   else if (ch1 == 'x')     /* Standard rule: 'x' ending -> 'cis'. */
  680.     sprintf(pch-1, "cis");
  681.  
  682.   return szInst;
  683. }
  684.  
  685.  
  686. /* Given a constellation index, fill out a string with the genitive or   */
  687. /* posessive form of its name. This basically just calls GetSzGenitive() */
  688. /* above, however it has to be called twice for names having two words.  */
  689.  
  690. void GetSzConstel(szGen, i)
  691. char *szGen;
  692. int i;
  693. {
  694.   char sz1[cchSzDef], sz2[cchSzDef], *pchSpace, *szInst;
  695.  
  696.   sprintf(szGen, "%s", szCnstlName[i]);
  697.  
  698.   for (pchSpace = szGen; *pchSpace && *pchSpace != ' '; pchSpace++)
  699.     ;
  700.  
  701.   szInst = (char *)szCnstlGenitive[i];
  702.  
  703.   if (*pchSpace == chNull)
  704.   {
  705.     GetSzGenitive(szGen, szInst);
  706.     return;
  707.   }
  708.   *pchSpace = chNull;
  709.  
  710.   if (szInst[0] == '!')
  711.   {
  712.     GetSzGenitive(szGen, szInst+1);
  713.     return;
  714.   }
  715.   sprintf(sz1, "%s", szGen);
  716.   sprintf(sz2, "%s", pchSpace+1);
  717.  
  718.   szInst = GetSzGenitive(sz1, szInst);
  719.   GetSzGenitive(sz2, szInst);
  720.   sprintf(szGen, "%s %s", sz1, sz2);
  721. }
  722.  
  723.  
  724. /* Print out a list of the 88 constellations used in astronomy, in their  */
  725. /* standard, English, and genitive forms, as invoked with the -HF switch. */
  726.  
  727. void PrintConstellations()
  728. {
  729.   int i, j = eWat;
  730.   char szGen[cchSzDef], sz[cchSzDef], chLast = chNull;
  731.  
  732.   sprintf(sz, "%s constellations:\n", szAppName); PrintSz(sz);
  733.   PrintSz("No. Name                Abbrev.   ");
  734.   PrintSz("Meaning            Genitive form\n\n");
  735.  
  736.   for(i = 1; i <= cCnstl; i++)
  737.   {
  738.     if(szCnstlName[i][0] != chLast)
  739.     {
  740.       chLast = szCnstlName[i][0];
  741.       j = (j + 1) & 3;
  742.       AnsiColor(kElemA[j]);
  743.     }
  744.  
  745.     sprintf(sz, "%2d: %-19s (%s) ", i, szCnstlName[i], szCnstlAbbrev[i]);
  746.     PrintSz(sz);
  747.  
  748.     if(szCnstlMeaning[i][0] == ' ')
  749.       sprintf(sz, "%-22s", szCnstlMeaning[i]+1);
  750.     else
  751.       sprintf(sz, "the %-18s", szCnstlMeaning[i]);
  752.  
  753.     PrintSz(sz);
  754.     GetSzConstel(szGen, i);
  755.     sprintf(sz, " (%s)\n", szGen); PrintSz(sz);
  756.   }
  757.   AnsiColor(kDefault);
  758. }
  759. #endif /* CONSTEL */
  760.  
  761.  
  762. /* Print out a list of the planets in the solar system (and our Moon), */
  763. /* listing astronomical info on them, as invoked with the -HS switch.  */
  764.  
  765. void PrintOrbit()
  766. {
  767.   char sz[cchSzDef];
  768.   int i;
  769.   real r;
  770.  
  771.   sprintf(sz, "%s planets:\n", szAppName); PrintSz(sz);
  772.  
  773.   PrintSz("   Name: Distance   Year     Day Diameter       Mass Density  ");
  774.   PrintSz("Axis Satellites\n\n");
  775.  
  776.   for (i = 0; i <= oPlu; i++) 
  777.   {
  778.     AnsiColor(kObjA[i]);
  779.     r = rObjDiam[i]*1000.0/2.0;
  780.  
  781.     sprintf(sz, "%7s:%9.3f%7.2f%8.2f%9.3f%11.3f%8.2f%6.2f%11d\n",
  782.       szObjName[i], rObjDist[i]/rObjDist[0], rObjYear[i], rObjDay[i],
  783.       rObjDiam[i]/rObjDiam[0], rObjMass[i],
  784.       (rObjMass[i]*5.974E24/1000.0)/((4.0/3.0)*(r*r*r)*rPi),
  785.       rObjAxis[i], cSatellite[i]);
  786.  
  787.     PrintSz(sz);
  788.   }
  789.   AnsiColor(kDefault);
  790. }
  791.  
  792.  
  793. #ifdef ARABIC
  794. /* Compare the strings corresponding to two Arabic part formulas. Like   */
  795. /* NCompareSz, this returns 0 if they are equal, a positive value if the */
  796. /* first is greater, and negative if the second is greater.              */
  797.  
  798. int NCompareSzPart(ap1, ap2)
  799. int ap1, ap2;
  800. {
  801.   char *pch1, *pch2;
  802.   int ich;
  803.  
  804.   pch1 = pi[ap1].form; pch2 = pi[ap2].form;
  805.   for (ich = 0; pch1[ich] && pch1[ich] == pch2[ich]; ich++) 
  806.   {
  807.     if (!us.fArabicFlip) 
  808.     {
  809.       /* If formulas are being displayed in alternate form, we need to */
  810.       /* effectively swap two sections in the string and then compare. */
  811.  
  812.       if (ich == 2)
  813.         ich = 5;
  814.  
  815.       else if (ich == 8)
  816.         ich = 2;
  817.  
  818.       else if (ich == 5)
  819.         ich = 8;
  820.     }
  821.   }
  822.   return pch1[ich] - pch2[ich];
  823. }
  824.  
  825.  
  826. /* Print out a list of all the Arabic parts in the current chart, computing */
  827. /* their positions first, as brought up with the -P switch.                 */
  828.  
  829. void DisplayArabic()
  830. {
  831.   real rPart[cPart], rBit[3], rCur;
  832.   char sz[cchSzDef], *pch, ch;
  833.   int iPart[cPart], h, i, j, k, l;
  834.  
  835.   PrintSz("Num."); PrintTab(' ', 20); PrintSz("Name Position");
  836.   PrintTab(' ', 1 + 4 * is.fSeconds);
  837.   PrintSz("House Formula              Flip Type\n");
  838.  
  839.   /* Calculate the zodiac positions of all the parts. */
  840.  
  841.   for (i = 0; i < cPart; i++)
  842.   {
  843.     rPart[i] = -rDegMax;
  844.  
  845.     if (i >= us.nArabicParts)
  846.       goto LNextPart;
  847.  
  848.     for (j = 0; j < 3; j++)
  849.     {
  850.       pch = &pi[i].form[j*3];
  851.       ch = pch[1];
  852.  
  853.       if(ch == ' ')         k = oAsc;
  854.       else if(ch == 'F')    k = -apFor;
  855.       else if(ch == 'S')    k = -apSpi;
  856.       else                  k = (ch-'0') * 10 + (pch[2]-'0');
  857.  
  858.       ch = *pch;
  859.  
  860.       if (ch == 'h')        rCur = house[k];                         /* House cusp */
  861.       else if (ch == 'r')   rCur = planet[rules[SFromZ(house[k])]];  /* Ruler of house cusp */
  862.       else if (ch == 'j')   rCur = house[k] + 10.0;                  /* 10 degrees of house cusp */
  863.       else if (ch == 'H')   rCur = house[inhouse[k]];                /* Planet's house */
  864.  
  865.       else if (ch == 'R')   /* Ruler of planet's house */
  866.         rCur = planet[rules[SFromZ(house[inhouse[k]])]];
  867.  
  868.       else if (ch == 'D')   /* Dispositor / ruler of planet's position */
  869.         rCur = planet[rules[SFromZ(planet[k])]];
  870.  
  871.       else if (FBetween(ch,'0','3'))
  872.         rCur = (real)((ch-'0') * 100 + k);
  873.  
  874.       else
  875.       {
  876.         if (k < 1)
  877.         {
  878.           rCur = rPart[-k];
  879.           if (rCur < 0.0)
  880.             goto LNextPart;
  881.         } 
  882.         else
  883.         {
  884.           if (ignore[k] && (us.fCusp || !FCusp(k)))
  885.             goto LNextPart;
  886.           else
  887.             rCur = planet[k];
  888.         }
  889.       }
  890.       rBit[j] = rCur;
  891.     }
  892.     rCur = rBit[1] - rBit[2];
  893.  
  894.     if (us.nArabicNight < 0 || (pi[i].form[9] == 'F' && inhouse[oSun] < sLib && us.nArabicNight == 0))
  895.       rCur = -rCur;
  896.     rCur = Mod(rCur + rBit[0]);
  897.     rPart[i] = rCur;
  898. LNextPart:
  899.     iPart[i] = i;
  900.   }
  901.  
  902.   /* Sort parts to figure out what order to display them in. */
  903.  
  904.   if (us.nArabic > 1) for (i = 1; i < cPart; i++) 
  905.   {
  906.     j = i-1;
  907.  
  908.     /* Compare part zodiac locations for -Pz switch. */
  909.  
  910.     if (us.nArabic == 'z') while (j >= 0 &&
  911.       rPart[iPart[j]] > rPart[iPart[j+1]]) {
  912.       SwapN(iPart[j], iPart[j+1]);
  913.       j--;
  914.  
  915.     /* Compare part names for -Pn switch. */
  916.  
  917.     } 
  918.  
  919.     else if (us.nArabic == 'n') while (j >= 0 && NCompareSz(pi[iPart[j]].name, pi[iPart[j+1]].name) > 0) 
  920.     {
  921.       SwapN(iPart[j], iPart[j+1]);
  922.       j--;
  923.     }
  924.  
  925.     /* Compare part formulas for -Pf switch. */
  926.  
  927.     else if (us.nArabic == 'f') while (j >= 0 && NCompareSzPart(iPart[j], iPart[j+1]) > 0) 
  928.     {
  929.       SwapN(iPart[j], iPart[j+1]);
  930.       j--;
  931.     }
  932.   }
  933.  
  934.   /* Display the positions and formulas of the parts. */
  935.  
  936.   for (h = i = 0; i < cPart; i++) 
  937.   {
  938.     l = iPart[i];
  939.  
  940.     if (rPart[l] < 0.0)
  941.       continue;
  942.  
  943.     sprintf(sz, "%3d: %23.23s ", ++h, pi[l].name); PrintSz(sz);
  944.     PrintZodiac(rPart[l]);
  945.     j = HousePlaceIn(rPart[l]);
  946.     sprintf(sz, " [%2d%s] ", j, szSuffix[j]);
  947.     AnsiColor(kSignA(j)); PrintSz(sz); AnsiColor(kDefault);
  948.     PrintCh('(');
  949.  
  950.     for (j = 0; j < 3; j++)
  951.     {
  952.       k = (j < 1 || us.fArabicFlip) ? j : 3-j;
  953.       pch = &pi[l].form[k*3];
  954.       ch = pch[1];
  955.       if (ch == ' ')
  956.         k = oAsc;
  957.       else if (ch == 'F')
  958.         k = -apFor;
  959.       else if (ch == 'S')
  960.         k = -apSpi;
  961.       else
  962.         k = (ch-'0') * 10 + (pch[2]-'0');
  963.       ch = *pch;
  964.       if (k < 1) 
  965.       {
  966.         AnsiColor(kObjA[oFor]);
  967.         sprintf(sz, "%3.3s", pi[-k].name); PrintSz(sz);
  968.       } 
  969.  
  970.       else
  971.       {
  972.         if (ch == ' ' || ch == 'H' || ch == 'R' || ch == 'D') 
  973.         {
  974.           AnsiColor(kSignA(ruler1[k]));
  975.           sprintf(sz, "%c%c%c", chObj3(k));
  976.         } 
  977.  
  978.         else if (FBetween(ch, '0', '3'))
  979.         {
  980.           k = (ch-'0') * 100 + k;
  981.           AnsiColor(kSignA(k/30+1));
  982.           sprintf(sz, "%2d%c%c%c", k%30, chSig3(k/30+1));
  983.         }
  984.  
  985.         else
  986.         {
  987.           AnsiColor(kSignA(k));
  988.           sprintf(sz, "%3d", k);
  989.         }
  990.         PrintSz(sz);
  991.       }
  992.  
  993.       AnsiColor(kDefault);
  994.  
  995.       if (sz[3] == chNull)
  996.       {
  997.         PrintCh(' ');
  998.         switch (ch) {
  999.         case 'h': ch = ' '; break;
  1000.         case 'r': ch = 'R'; break;
  1001.         case 'j': ch = '&'; break;
  1002.         default: ch = *pch;
  1003.         }
  1004.         PrintCh(ch);
  1005.       }
  1006.  
  1007.       if (j < 2)
  1008.       {
  1009.         sprintf(sz, " %c ", ( (j < 1) == us.fArabicFlip) ? '+' : '-');
  1010.         PrintSz(sz);
  1011.       }
  1012.  
  1013.     }
  1014.     PrintCh(' ');
  1015.     ch = pi[l].form[9];
  1016.  
  1017.     switch (ch) {
  1018.     case 'F': PrintSz("Y"); break;
  1019.     default: AnsiColor(kWhite); PrintSz("N"); AnsiColor(kDefault); break;
  1020.     }
  1021.  
  1022.     PrintSz(") ");
  1023.     ch = pi[l].form[10];
  1024.  
  1025.     switch (ch) {
  1026.     case 'C': AnsiColor(kElemA[eWat]); PrintSz("Comm."); break;
  1027.     case 'E': AnsiColor(kElemA[eFir]); PrintSz("Event"); break;
  1028.     case 'H': AnsiColor(kElemA[eEar]); PrintSz("Hora."); break;
  1029.     }
  1030.  
  1031.     AnsiColor(kDefault);
  1032.     PrintL();
  1033.   }
  1034. }
  1035. #endif /* ARABIC */
  1036.  
  1037.  
  1038. #ifdef GRAPH
  1039. /* Print a list of every key that one can press in a graphics window to do  */
  1040. /* a certain function, and a description of what it does, as displayed when */
  1041. /* one presses the 'H' or '?' key, and as shown with the -HX switch.        */
  1042.  
  1043. void DisplayKeysX()
  1044. {
  1045.   char sz[cchSzDef];
  1046.  
  1047.   sprintf(sz, "%s graphics screen key press options (version %s):", szAppName, szVersionCore);
  1048.  
  1049.   PrintS(sz);
  1050.   PrintS(" Press 'H' or '?' to display this list of key options.");
  1051.   PrintS(" Press 'p' to toggle pause status on or off.");
  1052.   PrintS(" Press 'x' to toggle fg/bg colors on screen.");
  1053.   PrintS(" Press 'm' to toggle color/monochrome display on screen.");
  1054.   PrintS(" Press 'i' to toggle status of the minor chart modification.");
  1055.   PrintS(" Press 't' to toggle header info on current chart on screen.");
  1056.   PrintS(" Press 'b' to toggle drawing of a border around the chart.");
  1057.   PrintS(" Press 'l' to toggle labeling of object points in chart.");
  1058.   PrintS(" Press 'j' to toggle not clearing screen between chart updates.");
  1059.   PrintS(" Press 'v' to display current chart positions on text screen.");
  1060.   PrintS(" Press 'R', 'C', 'u', 'U' to toggle restriction status of minor");
  1061.   PrintS("       objects, minor house cusps, uranian planets, and stars.");
  1062.   PrintS(" Press 'c' to toggle relationship comparison chart mode.");
  1063.   PrintS(" Press 's', 'h', 'f', 'g' to toggle status of sidereal zodiac,");
  1064.   PrintS("       heliocentric charts, domal charts, and decan charts.");
  1065.   PrintS(" Press 'O' and 'o' to recall/store a previous chart from memory.");
  1066. #ifdef X11
  1067.   PrintS(" Press 'B' to dump current window contents to root background.");
  1068. #else
  1069.   PrintS(" Press 'B' to resize chart display to full size of screen.");
  1070. #endif
  1071.   PrintS(" Press 'Q' to resize chart display to a square.");
  1072.   PrintS(" Press '<' and '>' to decrease/increase the scale size of the");
  1073.   PrintS("       glyphs and the size of world map.");
  1074.   PrintS(" Press '[' and ']' to decrease/increase tilt in globe display.");
  1075.   PrintS(" Press '+' and '-' to add/subtract a day from current chart.");
  1076. #ifdef TIME
  1077.   PrintS(" Press 'n' to set chart information to current time now.");
  1078. #endif
  1079.   PrintS(" Press 'N' to toggle animation status on or off. Charts will");
  1080.   PrintS("       be updated to current status and globe will rotate.");
  1081.   PrintS(" Press '!'-'(' to begin updating current chart by adding times.");
  1082.   PrintS("       !: seconds, @: minutes, #: hours, $: days, %: months,");
  1083.   PrintS("       ^: years, &: years*10, *: years*100, (: years*1000.");
  1084.   PrintS(" Press 'r' to reverse direction of time-lapse or animation.");
  1085.   PrintS(" Press '1'-'9' to set rate of animation to 'n' degrees, etc.");
  1086. #ifdef PCG
  1087.   PrintS(" Press '1'-'9' to determine section of chart to show if clipped.");
  1088. #endif
  1089.   PrintS(" Press 'V','L','A','Z','S','J','K','E','W','G','P' to switch to");
  1090.   PrintS("       normal (_v), astro-graph (_L), grid (_g), local (_Z),");
  1091.   PrintS("       space (_S), dispositor (_j), calendar (_K), ephemeris");
  1092.   PrintS("       (_E), world map (_XW), globe (_XG), and polar (_XP) modes.");
  1093.   PrintS(" Press 'Y' to switch to biorhythm relation chart mode.");
  1094.   PrintS(" Press '0' to toggle between _Z,_Z0 & _XW,_XW0 & _E,_Ey modes.");
  1095. #ifdef CONSTEL
  1096.   PrintS(" Press 'F' to toggle between world and constellation map modes.");
  1097. #endif
  1098. #ifdef PCG
  1099.   PrintS(" Press 'F1'..'F12' [plus Shift,Ctrl,Alt] to run macros 1..48.");
  1100. #endif
  1101.   PrintS(" Press 'space' to force redraw of current graphics display.");
  1102.   PrintS(" Press 'del' to clear the graphics screen and not redraw.");
  1103. #ifdef PCG
  1104.   PrintS(" Press 'tab' to toggle between graphics resolutions.");
  1105. #endif
  1106.   PrintS(" Press 'enter' to input a command line of general switches.");
  1107.   PrintS(" Press 'q' to terminate graphics and the program.");
  1108. #ifdef MOUSE
  1109.   PrintL();
  1110. #ifdef X11
  1111.   PrintS(" Left   mouse button: Draw line strokes on chart in window.");
  1112.   PrintS(" Middle mouse button: Print coordinates of pointer on world map.");
  1113.   PrintS(" Right  mouse button: Terminate the window and program.");
  1114. #endif
  1115. #ifdef PCG
  1116.   PrintS(" Left  mouse button: Draw line strokes on chart in screen.");
  1117.   PrintS(" Right mouse button: Set coordinates to pointer on world map.");
  1118. #endif
  1119. #endif /* MOUSE */
  1120. }
  1121.  
  1122.  
  1123. /* Print a list of every command switch dealing with the graphics features  */
  1124. /* that can be passed to the program, and a description of what it does.    */
  1125. /* This is part of what the -H switch prints, if graphics were compiled in. */
  1126.  
  1127. void DisplaySwitchesX()
  1128. {
  1129.   PrintS(" _X: Create a graphics chart instead of displaying it as text.");
  1130. #ifdef ISG
  1131.   PrintS(" _Xb: Create bitmap file instead of putting graphics on screen.");
  1132. #endif
  1133.   PrintS(" _Xb[n,c,v,a,b]: Set bitmap file output mode to X11 normal,");
  1134.   PrintS("     compacted, very compact, Ascii (bmtoa), or Windows bmp.");
  1135. #ifdef PS
  1136.   PrintS(" _Xp: Create PostScript stroke graphic instead of bitmap file.");
  1137.   PrintS(" _Xp0: Like _Xp but create complete instead of encapsulated file.");
  1138. #endif
  1139. #ifdef META
  1140.   PrintS(" _XM[0]: Create Windows metafile stroke graphic instead of bitmap.");
  1141. #endif
  1142.   PrintS(" _Xo <file>: Write output bitmap or graphic to specified file.");
  1143. #ifdef X11
  1144.   PrintS(" _XB: Display X chart on root instead of in a separate window.");
  1145. #endif
  1146.   PrintS(" _Xm: Create monochrome graphic instead of one in color.");
  1147.   PrintS(" _Xr: Create chart graphic in reversed colors (white background).");
  1148. #ifdef X11
  1149.   PrintS(" _Xw <hor> [<ver>], _ge[..]: Change the size of chart graphic.");
  1150. #else
  1151.   PrintS(" _Xw <hor> [<ver>]: Change the size of chart graphic.");
  1152. #endif
  1153.   PrintS(" _Xs <100,200,300,400>: Change the size of map or characters by %.");
  1154.   PrintS(" _Xi: Create chart graphic in slightly modified form.");
  1155.   PrintS(" _Xt: Inhibit display of chart info at bottom of graphic.");
  1156.   PrintS(" _Xu: Inhibit display of a border around graphic.");
  1157.   PrintS(" _Xl: Inhibit labeling of object points in chart graphic.");
  1158.   PrintS(" _Xj: Don't clear screen between chart updates, drawing trails.");
  1159.   PrintS(" _X1 <object>: Rotate wheel charts so object is at left edge.");
  1160.   PrintS(" _X2 <object>: Rotate wheel charts so object is at top edge.");
  1161. #ifdef X11
  1162.   PrintS(" _Xd <name>, _di[..] <name>: Open X window on specified display.");
  1163. #endif
  1164.   PrintS(" _XW: Simply create an image of the world map.");
  1165.   PrintS(" _XW0: Like _XW but do a non-rectangular Mollewide projection.");
  1166.   PrintS(" _XG [<degrees>]: Display the image of the world as a globe.");
  1167.   PrintS(" _XP: Like _XG but create the globe from a polar projection.");
  1168. #ifdef CONSTEL
  1169.   PrintS(" _XF: Display maps as constellations on the celestial sphere.");
  1170. #endif
  1171. #ifdef ISG
  1172.   PrintS(" _Xn [<mode>]: Start up chart or globe display in animation mode.");
  1173.   PrintS(" _HX: Display list of key press options for screen graphics.");
  1174. #endif
  1175. }
  1176. #endif /* GRAPH */
  1177.  
  1178.  
  1179. /* This is the dispatch procedure for all the generic table information      */
  1180. /* routines, such as those displaying the -H switch list, the list of signs, */
  1181. /* objects, default interpretations, and so on not requiring a date or time. */
  1182.  
  1183. bool FPrintTables()
  1184. {
  1185.   if (us.fCredit) {
  1186.     DisplayCredits();
  1187.     is.fMult = fTrue;
  1188.   }
  1189.   if (us.fSwitch) {
  1190.     if (is.fMult)
  1191.       PrintL2();
  1192.     DisplaySwitches();
  1193.     is.fMult = fTrue;
  1194.   }
  1195.   if (us.fSwitchRare) {
  1196.     if (is.fMult)
  1197.       PrintL2();
  1198.     DisplaySwitchesRare();
  1199.     is.fMult = fTrue;
  1200.   }
  1201. #ifdef GRAPH
  1202.   if (us.fKeyGraph) {
  1203.     if (is.fMult)
  1204.       PrintL2();
  1205.     DisplayKeysX();
  1206.     is.fMult = fTrue;
  1207.   }
  1208. #endif
  1209.   if (us.fSign) {
  1210.     if (is.fMult)
  1211.       PrintL2();
  1212.     PrintSigns();
  1213.     is.fMult = fTrue;
  1214.   }
  1215.   if (us.fObject) {
  1216.     if (is.fMult)
  1217.       PrintL2();
  1218.     PrintObjects();
  1219.     is.fMult = fTrue;
  1220.   }
  1221.   if (us.fAspect) {
  1222.     if (is.fMult)
  1223.       PrintL2();
  1224.     PrintAspects();
  1225.     is.fMult = fTrue;
  1226.   }
  1227. #ifdef CONSTEL
  1228.   if (us.fConstel) {
  1229.     if (is.fMult)
  1230.       PrintL2();
  1231.     PrintConstellations();
  1232.     is.fMult = fTrue;
  1233.   }
  1234. #endif
  1235.   if (us.fOrbitData) {
  1236.     if (is.fMult)
  1237.       PrintL2();
  1238.     PrintOrbit();
  1239.     is.fMult = fTrue;
  1240.   }
  1241. #ifdef INTERPRET
  1242.   if (us.fMeaning) {
  1243.     if (is.fMult)
  1244.       PrintL2();
  1245.     InterpretGeneral();
  1246.     InterpretAspectGeneral();
  1247.     is.fMult = fTrue;
  1248.   }
  1249. #endif
  1250.  
  1251.   /* If we also already have enough information to generate a chart,    */
  1252.   /* then go on and do so, else exit. (So things like "-H -i file" will */
  1253.   /* work, but things like just "-H" will print and exit right away.)   */
  1254.  
  1255.   return is.fMult && !is.fHaveInfo;
  1256. }
  1257.  
  1258. /* charts0.c */
  1259.